-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Connect] docs fixes #4384
[Connect] docs fixes #4384
Conversation
StripeConnect- public var delegate: (any StripeConnect.AccountOnboardingViewControllerDelegate)?
+ @objc deinit
+ func accountOnboardingDidExit(_ accountOnboarding: StripeConnect.AccountOnboardingViewController)
+ func accountOnboarding(_ accountOnboarding: StripeConnect.AccountOnboardingViewController, didFailLoadWithError error: any Swift.Error)
- public func accountOnboardingDidExit(_ accountOnboarding: StripeConnect.AccountOnboardingViewController)
- public func accountOnboarding(_ accountOnboarding: StripeConnect.AccountOnboardingViewController, didFailLoadWithError error: any Swift.Error) If you are adding a new public API consider the following:
If you are modifying or removing a public API:
If you confirm these APIs need to be added/updated and have undergone necessary review, add the label ℹ️ If this comment appears to be left in error, make sure your branch is up-to-date with |
b2e9b68
to
3300603
Compare
c4bb6ab
to
11bc356
Compare
@_documentation(visibility: public) | ||
public extension AccountOnboardingViewControllerDelegate { | ||
// Add default implementation of delegate methods to make them optional | ||
|
||
@_documentation(visibility: public) | ||
func accountOnboardingDidExit(_ accountOnboarding: AccountOnboardingViewController) { } | ||
|
||
@_documentation(visibility: public) | ||
func accountOnboarding(_ accountOnboarding: AccountOnboardingViewController, | ||
didFailLoadWithError error: Error) { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These were all needed so docc would mark them as "Default implementation provided"
podspec = Pod::Specification.from_file(File.join_if_safe($ROOT_DIR, m['podspec'])) | ||
index_content += "**[#{podspec.name}](../../#{m['framework_name'].downcase}/documentation/#{m['framework_name'].downcase})**\n\n#{podspec.summary}\n\n" | ||
modules | ||
.sort_by { |m| m['framework_name'] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alphabetizes the root page
public func encode(to encoder: Encoder) throws { | ||
var container = encoder.container(keyedBy: StringCodingKey.self) | ||
try container.encode(appearance.asDictionary(traitCollection: traitCollection), forKey: StringCodingKey("variables")) | ||
func encode(to encoder: Encoder) throws { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the struct is internal, no need to make this function public
var baseURL: URL = StripeConnectConstants.connectJSBaseURL | ||
|
||
var publicKeyOverride: String? = nil | ||
|
||
var publicKeyOverride: String? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
linter autofix
Updates 2.24.0 docs with fixes from #4384 Co-authored-by: Bitrise CI <[email protected]>
Summary
README is now included in the StripeConnect docs root page
Root cause: A placeholder
Docs.docc/StripeConnect.md
file needed to be included in the project. Thebuild_documentation
script copies the README contents into this file and because docc uses xcodebuild, it can only reference it if it's in the project.Fixed anchor tag links that were using incorrect casing
Root cause: docc is case-sensitive when generating anchor tags from headers, so these links didn't work on the docs site on pages that included the README. The change is compatible with Github as it's case-insensitive.
Now generating docs for API gated behind
@_spi(ConnectPrivateBeta)
Docc excludes SPI from docs since it's not public, however adding the
@_documentation(visibility: public)
fixes the issue. Unfortunately, this needs to be individually added to every SPI-reference to make it generate to docs, not just the enclosing type.Removed deprecation "hack" from
build_documentation
This was a workaround for the following docc bug, which has since been fixed:
AvailabilityParser marks
iOSApplicationExtension, unavailable
-annotated properties as universally deprecated swiftlang/swift-docc#450Cleaned up docstring references in Connect
Various minor fixes to docstrings like formatting the
seealso
sections using Markdoc.Alphabetized modules on root page
Motivation
https://jira.corp.stripe.com/browse/MXMOBILE-3003
Testing
deploy-docs
workflow on that branch: https://app.bitrise.io/build/b7abb0d9-9e19-4705-8550-c12c549b6785python3 -m http.server 4242
to locally serve the resulting docs siteChangelog
n/a